package com.zytlifeservice.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.File;

/**
 * Created by MJS on 2017/4/25.
 */

@ConfigurationProperties("Storage")
public class StorageProperties {

    private String location = "upload-dir";

    private String baseIconDir = "baseIcon";

    private String headIconDir = "headIcon";

    @Value("${web.upload-path}")
    private String dirPath;


    public String getLocation() {
        return dirPath;
    }

    public String getBaseIconDir() {
        return dirPath + File.separator + baseIconDir;
    }

    public String getHeadIconDir() {
        return dirPath + File.separator + headIconDir;
    }

    public void setLocation(String location) {
        this.dirPath = location;
    }
}
